<!DOCTYPE html>
<html lang="zh-cn">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>

</head>

<body>
	<script>
		//用户输入
		var mingzi = prompt('请输入你的名字');
		//弹出警示框
		alert(mingzi);
		//控制台输出
		console.log("输出");
	</script>
</body>

</html>